home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / Retrace.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  4.0 KB  |  140 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        Retrace.h
  3.  
  4.      Contains:    Vertical Retrace Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1985-1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __RETRACE__
  19. #define __RETRACE__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __OSUTILS__
  25. #include <OSUtils.h>
  26. #endif
  27.  
  28.  
  29.  
  30. #if PRAGMA_ONCE
  31. #pragma once
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_STRUCT_ALIGN
  43.     #pragma options align=mac68k
  44. #elif PRAGMA_STRUCT_PACKPUSH
  45.     #pragma pack(push, 2)
  46. #elif PRAGMA_STRUCT_PACK
  47.     #pragma pack(2)
  48. #endif
  49.  
  50. typedef struct VBLTask                     VBLTask;
  51. typedef VBLTask *                        VBLTaskPtr;
  52. typedef CALLBACK_API( void , VBLProcPtr )(VBLTaskPtr vblTaskPtr);
  53. /*
  54.     WARNING: VBLProcPtr uses register based parameters under classic 68k
  55.              and cannot be written in a high-level language without 
  56.              the help of mixed mode or assembly glue.
  57. */
  58. typedef REGISTER_UPP_TYPE(VBLProcPtr)                             VBLUPP;
  59.  
  60. struct VBLTask {
  61.     QElemPtr                         qLink;
  62.     short                             qType;
  63.     VBLUPP                             vblAddr;
  64.     short                             vblCount;
  65.     short                             vblPhase;
  66. };
  67.  
  68. enum { uppVBLProcInfo = 0x00009802 };                             /* register no_return_value Func(4_bytes:A0) */
  69. #define NewVBLProc(userRoutine)                                 (VBLUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppVBLProcInfo, GetCurrentArchitecture())
  70. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  71.     #pragma parameter CallVBLProc(__A1, __A0)
  72.     void CallVBLProc(VBLUPP routine, VBLTaskPtr vblTaskPtr) = 0x4E91;
  73. #else
  74.     #define CallVBLProc(userRoutine, vblTaskPtr)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppVBLProcInfo, (vblTaskPtr))
  75. #endif
  76. EXTERN_API( QHdrPtr )
  77. GetVBLQHdr                        (void)                                                        THREEWORDINLINE(0x2EBC, 0x0000, 0x0160);
  78.  
  79.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  80.                                                                                             #pragma parameter __D0 SlotVInstall(__A0, __D0)
  81.                                                                                             #endif
  82. EXTERN_API( OSErr )
  83. SlotVInstall                    (QElemPtr                 vblBlockPtr,
  84.                                  short                     theSlot)                            ONEWORDINLINE(0xA06F);
  85.  
  86.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  87.                                                                                             #pragma parameter __D0 SlotVRemove(__A0, __D0)
  88.                                                                                             #endif
  89. EXTERN_API( OSErr )
  90. SlotVRemove                        (QElemPtr                 vblBlockPtr,
  91.                                  short                     theSlot)                            ONEWORDINLINE(0xA070);
  92.  
  93.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  94.                                                                                             #pragma parameter __D0 AttachVBL(__D0)
  95.                                                                                             #endif
  96. EXTERN_API( OSErr )
  97. AttachVBL                        (short                     theSlot)                            ONEWORDINLINE(0xA071);
  98.  
  99.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  100.                                                                                             #pragma parameter __D0 DoVBLTask(__D0)
  101.                                                                                             #endif
  102. EXTERN_API( OSErr )
  103. DoVBLTask                        (short                     theSlot)                            ONEWORDINLINE(0xA072);
  104.  
  105.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  106.                                                                                             #pragma parameter __D0 VInstall(__A0)
  107.                                                                                             #endif
  108. EXTERN_API( OSErr )
  109. VInstall                        (QElemPtr                 vblTaskPtr)                            ONEWORDINLINE(0xA033);
  110.  
  111.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  112.                                                                                             #pragma parameter __D0 VRemove(__A0)
  113.                                                                                             #endif
  114. EXTERN_API( OSErr )
  115. VRemove                            (QElemPtr                 vblTaskPtr)                            ONEWORDINLINE(0xA034);
  116.  
  117.  
  118.  
  119.  
  120. #if PRAGMA_STRUCT_ALIGN
  121.     #pragma options align=reset
  122. #elif PRAGMA_STRUCT_PACKPUSH
  123.     #pragma pack(pop)
  124. #elif PRAGMA_STRUCT_PACK
  125.     #pragma pack()
  126. #endif
  127.  
  128. #ifdef PRAGMA_IMPORT_OFF
  129. #pragma import off
  130. #elif PRAGMA_IMPORT
  131. #pragma import reset
  132. #endif
  133.  
  134. #ifdef __cplusplus
  135. }
  136. #endif
  137.  
  138. #endif /* __RETRACE__ */
  139.  
  140.